<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<div></div>
	</body>
	<script>
	/**
	 * 操作style样式时：
	 * 	1. 属性用驼峰命名法
	 *  2. DOM操作修改行内样式，行内样式权重更高
	 * */
		var div = document.querySelector("div");
		div.onclick = function() {
			div.style.backgroundColor = "red";
		}
	</script>
	<style>
		div {
			width: 100px;
			height: 100px;
			background-color: aqua;
		}
	</style>
</html>
